package mn.idax.exchange.otc.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auther: dison
 * @Date: 2018/8/31 14:25
 * @Description:
 */
@Getter
@AllArgsConstructor
public enum MessageNotifyEnum {

    order,
    system;

    /** 跳转类型 **/
    public enum SkipType{
        my_wallet, // 我的钱包

        order_detail, // 订单详情

        arbitration, // 申诉

        ad_detail // 广告详情

    }

    @Getter
    @AllArgsConstructor
    public enum BodyTemplate{
        //------------------ 订单消息 放入国际化中 -------------------//
        order_trade(MessageNotifyEnum.order, SkipType.order_detail, "710000"),
        order_pay(MessageNotifyEnum.order, SkipType.order_detail, "710001"),
        order_release(MessageNotifyEnum.order, SkipType.order_detail, "710002"),
        order_expire(MessageNotifyEnum.order, SkipType.order_detail, "710003"),
        order_cancel(MessageNotifyEnum.order, SkipType.order_detail, "710004"),



        //----------------- 系统消息 ---------------------//
        ad_expire_cancel(MessageNotifyEnum.system, SkipType.ad_detail, "710008"),
        ad_balance_sold_out(MessageNotifyEnum.system, SkipType.ad_detail, "710009"),
        // -- 仲裁通知from订单to系统 .jension 2018.11.16
        arbitration_apply(MessageNotifyEnum.system, SkipType.arbitration, "710005"),
        arbitration_success(MessageNotifyEnum.system, SkipType.arbitration,"710006"),
        arbitration_fail(MessageNotifyEnum.system, SkipType.arbitration,"710007")
        ;
        private MessageNotifyEnum messageNotifyEnum;
        private SkipType skipType;
        private String bodyCode;
    }

    @Getter
    @AllArgsConstructor
    public enum ChatTemplate{
        //------------------ 订单消息 放入国际化中 -------------------//
        order_trade(MessageNotifyEnum.order, SkipType.order_detail, "720000"),
        order_pay(MessageNotifyEnum.order, SkipType.order_detail, "720001"),
        order_release(MessageNotifyEnum.order, SkipType.order_detail, "720002"),
        order_expire(MessageNotifyEnum.order, SkipType.order_detail, "720003"),
        order_cancel(MessageNotifyEnum.order, SkipType.order_detail, "720004"),
        order_finish(MessageNotifyEnum.order, SkipType.order_detail, "720005"),

        ;
        private MessageNotifyEnum messageNotifyEnum;
        private SkipType skipType;
        private String bodyCode;
    }

    public enum QueryField{
        receiver,
        messageType,
        sendTime
    }

    @Getter
    @AllArgsConstructor
    public enum MessageType{

        system(1),
        order(2),
        ;

        private Integer type;

    }
}
